#ifndef HUD_TEXT_H
#define HUD_TEXT_H

#include "consts.h"
#include "cash.h"

extern int G_W, G_H;

class STAGE_TEXT : public QObject, public QGraphicsItemGroup
{
    Q_OBJECT

private:
    GRAPHICS_PIXMAP_ITEM *item_stage;
    GRAPHICS_PIXMAP_ITEM *item_first_digit;
    GRAPHICS_PIXMAP_ITEM *item_separator;
    GRAPHICS_PIXMAP_ITEM *item_second_digit;

    int first_digit;
    int second_digit;

    QTimeLine *tl_anims;

    CASH *cash;

public:
    STAGE_TEXT(int first_digit, int second_digit, CASH *cash);

    ~STAGE_TEXT();

    void anim_init();

    QPainterPath shape() const;

public slots:
    void anim_show();
    void anim_hide();

    void anims_finished();
};

#endif // HUD_TEXT_H
